
Public Class AliasList(Of T As IAlias)
    Inherits Generic.List(Of T)

    Private _AliasDictionary As New Dictionary(Of String, IAlias)
    Private _NameDictionary As New Dictionary(Of String, IAlias)
    Public Overloads Sub Add(ByVal o As IAlias)
        MyBase.Add(o)
        _AliasDictionary.Add(o.Alias, o)
        _NameDictionary.Add(o.Name, o)
    End Sub

    Public Function SearchByAlias(ByVal [alias] As String) As IAlias
        If _AliasDictionary.ContainsKey([alias]) Then
            Return _AliasDictionary.Item([alias])
        Else
            Return Nothing
        End If
    End Function
    Public Function SaerchByName(ByVal name As String) As IAlias
        If _NameDictionary.ContainsKey(name) Then
            Return _NameDictionary.Item(name)
        Else
            Return Nothing
        End If
    End Function
End Class